<template>
  <div class="box">
    <Head
      :title="`${this.$route.query.title}`"
      style="border-bottom: 2px solid #dad9df"
      id="backstyle"
    >
    <img src="../../../assets/black_star.png" alt="" />
    </Head>
    <div class="war">
      <div class="area-center center">
        <!-- 视频区域 -->
        <div
          class="video"
          v-for="(item, index) in list"
          :key="index"
          @click="vide(item)"
        >
          <div class="tu fcc">
            <img :src="getImgUrl(item.videoPic)" alt="" />
          </div>
          <div class="bold-size text">{{ item.videoName }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Head from "@/components/public/HeadPage.vue";
import { videoTitle } from "@/api/index";

export default {
  data() {
    return {
      list: [],
      playsinline: true,
      playerOptions: [],
      options: "",
      maskShow: false,
    };
  },
  components: {
    Head,
  },
  mounted() {
    videoTitle("文化视频").then((res) => {
      if (res.data.code == 200) {
        this.list = res.data.rows;
      }
    });
  },
  methods: {
    vide(item) {
      this.$router.push({
        path: "/video",
        query: { id: item.videoId, title: item.videoName },
      });
    },
    getImgUrl(img) {
      return this.montageImgUrl(img);
    },
  },
};
</script>

<style scoped>
.box {
  width: 100%;
}
.to {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* 头标区域 */
.Head_top img {
  width: 0.2rem;
  margin-right: 0.05rem;
}

.xiao {
  width: 100%;

  display: flex;
  background-color: white;
}
/* 左边区域 */
.xiao .left {
  width: 5%;
  height: 100%;
  margin-left: 0.2rem;
}
.xiao .left img {
  width: 0.2rem;
  height: 0.2rem;
  margin-top: 0.03rem;
}
.zhong {
  padding-left: 0.1rem;
  line-height: 0.27rem;
  font-weight: 700;
}
h3 {
  height: 0.3rem;
  line-height: 0.3rem;
  text-align: center;
  border-radius: 0.1rem;
  margin: 0.05rem 0;
  background-color: white;
}
.center {
  display: flex;
  flex-wrap: wrap;
}
/* 视频区域 */
.center .video {
  width: 46%;
  min-height: 1rem;
  flex-shrink: 0;
  margin: 0.07rem;
  border-radius: 0.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f0eff5;
  box-sizing: border-box;
}
.video .tu {
  width: 100%;
  height: 1.6rem;
}
.center .video img {
  width: 93%;
  height: 1.5rem;
}
.text {
  width: 100%;
  line-height: 0.3rem;
  text-align: center;
}
</style>